part of 'cpp_native.dart';

///对应C的结构体
final class MyStruct extends Struct {
  @Int32()
  external int a;

  @Float()
  external double b;

  external Pointer<Void> c;

  ///get string
  Pointer<Utf8> get cStr => c.cast<Utf8>();
  @override
  String toString() {
    return '$a,$b:${cStr.toDartString()}';
  }
}

///结构体
typedef TestCB = Void Function(Pointer<MyStruct>);
